-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] SAMS samplers and documentation #214
base: main
Are you sure you want to change the base?
Conversation
@andrrizzi : I'm running into an issue I don't quite understand here that involves the new
What is happening here is that
Any ideas here? Does |
I don't think that's necessary for now. It's just a precautionary thing in case the |
@andrrizzi : I'm trying to reconcile the The The What do you think our approach should be here? |
Also, what should we call the method that updates the sampler chain by one Monte Carlo step? Should this be |
The
I would reserve |
OK, I'll just do the minimal amount of refactoring to have
|
Ok. I think it's all internal anyway, so we can easily postpone it to later modifications if you have higher priority things to do.
Ah, I see, thanks. Both sounds good then. |
Is it OK if, instead of creating/destroying a new |
Hmm. That'd be a good feature to have, but I'd avoid making changes to the API of for move in mcmc_moves:
timer.start(move.__class__.__name__)
move.apply(...)
timer.stop(...) |
Otherwise we can have a centralized and more sophisticated timing utility, but I'd still try to keep it outside the API of the single objects. |
I'm revisiting what needs to be done here to finish up this PR.
|
This question is relevant to adding optional storage backing to the Standard could involve creating a stack of samplers that can each bind to storage: mcmc_sampler = MCMCSampler(thermodynamic_state, sampler_state, move=mcmc_move, storage=storage)
exen_sampler = ExpandedEnsemble(mcmc_sampler, thermodynamic_states, storage=storage)
sams_sampler = SAMS(exen_sampler, storage=storage) Alternatively, we could detect if the lowest-level sampler has a storage layer bound and use that if so: # Use storage defined in MCMCSampler for all layers
mcmc_sampler = MCMCSampler(thermodynamic_state, sampler_state, move=mcmc_move, storage=storage)
exen_sampler = ExpandedEnsemble(mcmc_sampler, thermodynamic_states)
sams_sampler = SAMS(exen_sampler) |
For storage: We'll merge in the storage PR I have open (after I fix its clashes) |
Supercedes #203.
This is an initial import of the SAMS sampler infrastructure.
Docs preview can be found here.
Remaining tasks:
We will switch the storage layer to be more similar to
repex
in a subsequent PR.